import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';

class Loading extends StatefulWidget {
  LoadingPage createState() => LoadingPage();
}

class LoadingPage extends State<Loading> {
  late Timer _timer;
  startTime() async {
    _timer = Timer.periodic(Duration(seconds: 0), (v) {
      _timer.cancel();
      Navigator.of(context).pushReplacementNamed('login');
    });
  }

  @override
  void initState() {
    super.initState();
    startTime();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
          height: double.infinity,
          width: double.infinity,
          color: Colors.blue,
          child: SafeArea(
              child: Padding(
            padding: EdgeInsets.only(top: 100),
            child: Column(
              children: [
                Text(
                  "Talking",
                  style: const TextStyle(
                      color: Colors.yellow,
                      fontSize: 80,
                      fontFamily: "HanaleiFill"),
                ),
              ],
            ),
          ))),
    );
  }
}
